import request from '@/config/axios'

export interface MarketingOrderInfoVO {
  orderNumber: string
  dictOrderType: number
  dictBusinessType: number
  dictSaleType: number
  customerName: string
  customerCode: string
  salesDepartment: string
  contractDate: Date
  orderDate: Date
  salesperson: string
  taxRate: number
  exchangeRate: number
  paymentConditions: string
  dictChangeType: number
  orderVersion: string
  orderChangePerson: string
  orderChangeDate: Date
  remark: string
  businessContractUrl: string
  businessContractName: string
  dictOrderStatus: number
  id: number
}

// 查询订单信息列表
export const getMarketingOrderInfoPage = async (params) => {
  return await request.get({ url: `/order/marketing-order-info/page`, params })
}

// 查询订单信息详情
export const getMarketingOrderInfo = async (id: number) => {
  return await request.get({ url: `/order/marketing-order-info/get?id=` + id })
}


// 新增订单信息
export const createMarketingOrderInfo = async (data) => {
  return await request.post({ url: `/order/marketing-order-info/create`, data })
}

// 修改订单信息
export const updateMarketingOrderInfo = async (data) => {
  return await request.put({ url: `/order/marketing-order-info/update`, data })
}

// 删除订单信息
export const deleteMarketingOrderInfo = async (id: number) => {
  return await request.delete({ url: `/order/marketing-order-info/delete?id=` + id })
}

//获取u8客户信息

export const getCustomerProfileList = async (params) => {
  return await request.get({ url: `/customer/data/list`, params })
}
// 导出订单信息 Excel
export const exportMarketingOrderInfo = async (params) => {
  return await request.download({ url: `/order/marketing-order-info/export-excel`, params })
}
